package com.example.demoapp.brvah.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.demoapp.R;
import com.example.demoapp.brvah.bean.CollectItemBean;

import org.jetbrains.annotations.Nullable;

import java.util.List;

public class CollectAdapter extends BaseQuickAdapter<CollectItemBean, BaseViewHolder> {

    public CollectAdapter(int layoutResId, @Nullable List<CollectItemBean> data) {
        super(layoutResId, data);
    }

    public CollectAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final CollectItemBean item) {
        helper.setText(R.id.title,item.getTitle());
        helper.setText(R.id.date,item.getUpdateTime().split(" ")[0]);
    }
}
